package com.junzhiit.nengji.dao.impl;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.bainaeco.framework.base.dao.AbstractBaseDAO;
import com.bainaeco.framework.common.jdbc.StatementParameter;
import com.junzhiit.nengji.dao.SystemTypeLabelDAO;
import com.junzhiit.nengji.model.SystemTypeLabel;

@Repository
public class SystemTypeLabelDAOImpl extends AbstractBaseDAO<SystemTypeLabel> implements SystemTypeLabelDAO{
	
	@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
	@Override
	public boolean deleteByLabelId(String labelId){
		StringBuffer sql=new StringBuffer();
		sql.append(" delete from system_type_label where label_id=?");
		
		StatementParameter param=new StatementParameter();
		param.setString(labelId);
		
		return super.updateForBoolean(sql.toString(), param);
	}
}
